import Vue from 'vue'
import VueRouter from 'vue-router'
import OrderList from '../views/order/OrderConfirm.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'orderList',
    component: OrderList
  },
  {
    path: '/views/order/OrderConfirm',
    name: 'orderConfirm',
    component: () => import('../views/order/OrderConfirm.vue')
  },
  {
    path: '/views/order/Addresslist',
    name: 'addresslist',
    component: () => import('../views/order/Addresslist.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/user/Login.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/user/Register.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart/Cart.vue')
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('../views/detail/Detail.vue')
  }


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
